home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 June / PersonalComputerWorld-June2009-CoverdiscCD.iso / Software / Shareware / Mockups for Desktop 1.5.27 / MockupsForDesktop.air / MockupsAir.swf / scripts / MockupsAir.as < prev    next >
Encoding:
Text File  |  2009-03-03  |  65.9 KB  |  1,659 lines

  1. package
  2. {
  3.    import com.plus9.mockups.MockupModel;
  4.    import com.plus9.mockups.Mockups;
  5.    import com.plus9.mockups.dialogs.NagDialog;
  6.    import com.plus9.mockups.events.MockupModelEvent;
  7.    import com.plus9.mockups.model.IStorageManager;
  8.    import com.plus9.mockups.ui.AppBarMenus;
  9.    import flash.accessibility.*;
  10.    import flash.data.*;
  11.    import flash.debugger.*;
  12.    import flash.desktop.*;
  13.    import flash.display.*;
  14.    import flash.errors.*;
  15.    import flash.events.*;
  16.    import flash.external.*;
  17.    import flash.filesystem.*;
  18.    import flash.filters.*;
  19.    import flash.geom.*;
  20.    import flash.html.*;
  21.    import flash.html.script.*;
  22.    import flash.media.*;
  23.    import flash.net.*;
  24.    import flash.printing.*;
  25.    import flash.profiler.*;
  26.    import flash.system.*;
  27.    import flash.text.*;
  28.    import flash.ui.*;
  29.    import flash.utils.*;
  30.    import flash.xml.*;
  31.    import mx.binding.*;
  32.    import mx.containers.Canvas;
  33.    import mx.core.UIComponentDescriptor;
  34.    import mx.core.WindowedApplication;
  35.    import mx.core.mx_internal;
  36.    import mx.events.FlexEvent;
  37.    import mx.events.FlexNativeWindowBoundsEvent;
  38.    import mx.events.PropertyChangeEvent;
  39.    import mx.managers.DragManager;
  40.    import mx.managers.PopUpManager;
  41.    import mx.styles.*;
  42.    
  43.    use namespace mx_internal;
  44.    
  45.    public class MockupsAir extends WindowedApplication implements IBindingClient
  46.    {
  47.       private static var _watcherSetupUtil:IWatcherSetupUtil;
  48.       
  49.       mx_internal static var _MockupsAir_StylesInit_done:Boolean = false;
  50.       
  51.       private var _1541057692_mockupsBar:MockupsBar;
  52.       
  53.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268:Class;
  54.       
  55.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstOverSkin_895636888:Class;
  56.       
  57.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonUpSkin_944469021:Class;
  58.       
  59.       private var _embed__font_MockupsBoldFont_medium_normal_341357016:Class;
  60.       
  61.       private var _embed_css___skin_VScrollThumb_png_1095913499:Class;
  62.       
  63.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastDownSkin_284089736:Class;
  64.       
  65.       mx_internal var _bindingsByDestination:Object;
  66.       
  67.       protected var _snapshotName:String;
  68.       
  69.       private var _embed_css___skin_uparrow_png_504447974:Class;
  70.       
  71.       private var _embed_css___skin_menuRadioIcon_png_482829281:Class;
  72.       
  73.       private var _embed_css___skin_MockupsSkinAssets_swf_SearchBox_1716360600:Class;
  74.       
  75.       private var _embed_css___skin_MockupsSkinAssets_swf_HUDSearchBox_84570465:Class;
  76.       
  77.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294:Class;
  78.       
  79.       mx_internal var _watchers:Array;
  80.       
  81.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192:Class;
  82.       
  83.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstDownSkin_2086033686:Class;
  84.       
  85.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastOverSkin_596406218:Class;
  86.       
  87.       private var _embed_css___skin_MockupsSkinAssets_swf_Button_SelectedSkin_2099491370:Class;
  88.       
  89.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonOverSkin_828974362:Class;
  90.       
  91.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastUpSkin_605336577:Class;
  92.       
  93.       protected var _updateSizeTimer:Timer;
  94.       
  95.       private var _embed_css___skin_downarrow_png_1464922515:Class;
  96.       
  97.       mx_internal var _bindingsBeginWithWord:Object;
  98.       
  99.       protected var _1585134695_version:String = "1.5.27 - 03/03/2009 04:50 (Air)";
  100.       
  101.       private var _embed_css___skin_checkboxselectedup_png_316675045:Class;
  102.       
  103.       private var _710521297_mockups:Mockups;
  104.       
  105.       private var _embed__font_MockupsBaseFont_medium_normal_652023787:Class;
  106.       
  107.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonDownSkin_1913424292:Class;
  108.       
  109.       private var _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstUpSkin_2036655329:Class;
  110.       
  111.       mx_internal var _bindings:Array;
  112.       
  113.       protected var _nagTimer:Timer;
  114.       
  115.       private var _documentDescriptor_:UIComponentDescriptor;
  116.       
  117.       protected var _94969_sm:StorageManagerAir;
  118.       
  119.       protected var _nagDialog:NagDialog;
  120.       
  121.       private var _embed_css___skin_menucheck_png_1180737653:Class;
  122.       
  123.       public function MockupsAir()
  124.       {
  125.          _documentDescriptor_ = new UIComponentDescriptor({
  126.             "type":WindowedApplication,
  127.             "propertiesFactory":function():Object
  128.             {
  129.                return {"childDescriptors":[new UIComponentDescriptor({
  130.                   "type":Canvas,
  131.                   "propertiesFactory":function():Object
  132.                   {
  133.                      return {
  134.                         "percentWidth":100,
  135.                         "percentHeight":100,
  136.                         "styleName":"mockupsCanvas",
  137.                         "childDescriptors":[new UIComponentDescriptor({
  138.                            "type":Mockups,
  139.                            "id":"_mockups",
  140.                            "stylesFactory":function():void
  141.                            {
  142.                               this.top = "0";
  143.                               this.bottom = "32";
  144.                            },
  145.                            "propertiesFactory":function():Object
  146.                            {
  147.                               return {
  148.                                  "percentWidth":100,
  149.                                  "autoSave":false
  150.                               };
  151.                            }
  152.                         }),new UIComponentDescriptor({
  153.                            "type":MockupsBar,
  154.                            "id":"_mockupsBar",
  155.                            "stylesFactory":function():void
  156.                            {
  157.                               this.bottom = "5";
  158.                               this.left = "10";
  159.                               this.right = "10";
  160.                            },
  161.                            "propertiesFactory":function():Object
  162.                            {
  163.                               return {"height":22};
  164.                            }
  165.                         })]
  166.                      };
  167.                   }
  168.                })]};
  169.             }
  170.          });
  171.          _embed__font_MockupsBaseFont_medium_normal_652023787 = MockupsAir__embed__font_MockupsBaseFont_medium_normal_652023787;
  172.          _embed__font_MockupsBoldFont_medium_normal_341357016 = MockupsAir__embed__font_MockupsBoldFont_medium_normal_341357016;
  173.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonDownSkin_1913424292 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonDownSkin_1913424292;
  174.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonOverSkin_828974362 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonOverSkin_828974362;
  175.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  176.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonUpSkin_944469021 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonUpSkin_944469021;
  177.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstDownSkin_2086033686 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstDownSkin_2086033686;
  178.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstOverSkin_895636888 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstOverSkin_895636888;
  179.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  180.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstUpSkin_2036655329 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstUpSkin_2036655329;
  181.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastDownSkin_284089736 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastDownSkin_284089736;
  182.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastOverSkin_596406218 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastOverSkin_596406218;
  183.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  184.          _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastUpSkin_605336577 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastUpSkin_605336577;
  185.          _embed_css___skin_MockupsSkinAssets_swf_Button_SelectedSkin_2099491370 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_Button_SelectedSkin_2099491370;
  186.          _embed_css___skin_MockupsSkinAssets_swf_HUDSearchBox_84570465 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_HUDSearchBox_84570465;
  187.          _embed_css___skin_MockupsSkinAssets_swf_SearchBox_1716360600 = MockupsAir__embed_css___skin_MockupsSkinAssets_swf_SearchBox_1716360600;
  188.          _embed_css___skin_VScrollThumb_png_1095913499 = MockupsAir__embed_css___skin_VScrollThumb_png_1095913499;
  189.          _embed_css___skin_checkboxselectedup_png_316675045 = MockupsAir__embed_css___skin_checkboxselectedup_png_316675045;
  190.          _embed_css___skin_downarrow_png_1464922515 = MockupsAir__embed_css___skin_downarrow_png_1464922515;
  191.          _embed_css___skin_menuRadioIcon_png_482829281 = MockupsAir__embed_css___skin_menuRadioIcon_png_482829281;
  192.          _embed_css___skin_menucheck_png_1180737653 = MockupsAir__embed_css___skin_menucheck_png_1180737653;
  193.          _embed_css___skin_uparrow_png_504447974 = MockupsAir__embed_css___skin_uparrow_png_504447974;
  194.          mx_internal::_bindings = [];
  195.          mx_internal::_watchers = [];
  196.          mx_internal::_bindingsByDestination = {};
  197.          mx_internal::_bindingsBeginWithWord = {};
  198.          super();
  199.          mx_internal::_document = this;
  200.          if(!this.styleDeclaration)
  201.          {
  202.             this.styleDeclaration = new CSSStyleDeclaration();
  203.          }
  204.          this.styleDeclaration.defaultFactory = function():void
  205.          {
  206.             this.backgroundGradientColors = [4737096,4737096];
  207.             this.backgroundColor = 4737096;
  208.          };
  209.          mx_internal::_MockupsAir_StylesInit();
  210.          this.layout = "absolute";
  211.          this.horizontalScrollPolicy = "off";
  212.          this.verticalScrollPolicy = "off";
  213.          this.addEventListener("creationComplete",___MockupsAir_WindowedApplication1_creationComplete);
  214.          this.addEventListener("addedToStage",___MockupsAir_WindowedApplication1_addedToStage);
  215.       }
  216.       
  217.       public static function set watcherSetupUtil(param1:IWatcherSetupUtil) : void
  218.       {
  219.          MockupsAir._watcherSetupUtil = param1;
  220.       }
  221.       
  222.       public function ___MockupsAir_WindowedApplication1_creationComplete(param1:FlexEvent) : void
  223.       {
  224.          onCreationComplete();
  225.       }
  226.       
  227.       private function _MockupsAir_bindingsSetup() : Array
  228.       {
  229.          var binding:Binding = null;
  230.          var result:Array = [];
  231.          binding = new Binding(this,function():String
  232.          {
  233.             var _loc1_:* = _version;
  234.             return _loc1_ == undefined ? null : String(_loc1_);
  235.          },function(param1:String):void
  236.          {
  237.             _mockups.build = param1;
  238.          },"_mockups.build");
  239.          result[0] = binding;
  240.          binding = new Binding(this,function():IStorageManager
  241.          {
  242.             return _sm;
  243.          },function(param1:IStorageManager):void
  244.          {
  245.             _mockups.storageManager = param1;
  246.          },"_mockups.storageManager");
  247.          result[1] = binding;
  248.          return result;
  249.       }
  250.       
  251.       protected function onFullScreen(param1:FullScreenEvent) : void
  252.       {
  253.          if(param1.fullScreen)
  254.          {
  255.             _mockups.setStyle("bottom",0);
  256.             _mockupsBar.visible = false;
  257.          }
  258.          else
  259.          {
  260.             _mockups.setStyle("bottom",32);
  261.             _mockupsBar.visible = true;
  262.          }
  263.          invalidateDisplayList();
  264.          validateDisplayList();
  265.       }
  266.       
  267.       protected function set _version(param1:String) : void
  268.       {
  269.          var _loc2_:Object = this._1585134695_version;
  270.          if(_loc2_ !== param1)
  271.          {
  272.             this._1585134695_version = param1;
  273.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"_version",_loc2_,param1));
  274.          }
  275.       }
  276.       
  277.       mx_internal function _MockupsAir_StylesInit() : void
  278.       {
  279.          var style:CSSStyleDeclaration = null;
  280.          var effects:Array = null;
  281.          if(mx_internal::_MockupsAir_StylesInit_done)
  282.          {
  283.             return;
  284.          }
  285.          mx_internal::_MockupsAir_StylesInit_done = true;
  286.          style = StyleManager.getStyleDeclaration(".buttonBarFirstTab");
  287.          if(!style)
  288.          {
  289.             style = new CSSStyleDeclaration();
  290.             StyleManager.setStyleDeclaration(".buttonBarFirstTab",style,false);
  291.          }
  292.          if(style.factory == null)
  293.          {
  294.             style.factory = function():void
  295.             {
  296.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  297.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  298.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  299.                this.upSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstUpSkin_2036655329;
  300.                this.downSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstDownSkin_2086033686;
  301.                this.overSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstOverSkin_895636888;
  302.             };
  303.          }
  304.          style = StyleManager.getStyleDeclaration(".boldFont");
  305.          if(!style)
  306.          {
  307.             style = new CSSStyleDeclaration();
  308.             StyleManager.setStyleDeclaration(".boldFont",style,false);
  309.          }
  310.          if(style.factory == null)
  311.          {
  312.             style.factory = function():void
  313.             {
  314.                this.fontWeight = "normal";
  315.                this.fontFamily = "MockupsBoldFont";
  316.             };
  317.          }
  318.          style = StyleManager.getStyleDeclaration(".HUDButton");
  319.          if(!style)
  320.          {
  321.             style = new CSSStyleDeclaration();
  322.             StyleManager.setStyleDeclaration(".HUDButton",style,false);
  323.          }
  324.          if(style.factory == null)
  325.          {
  326.             style.factory = function():void
  327.             {
  328.                this.borderColor = 16777215;
  329.                this.fontWeight = "normal";
  330.                this.textRollOverColor = 0;
  331.                this.fontSize = 9;
  332.                this.fontFamily = "MockupsBaseFont";
  333.                this.fillAlphas = [1,1];
  334.                this.color = 16777215;
  335.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_Button_SelectedSkin_2099491370;
  336.                this.cornerRadius = 6;
  337.                this.fillColors = [4934475,4934475,4934475,4934475];
  338.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_Button_SelectedSkin_2099491370;
  339.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_Button_SelectedSkin_2099491370;
  340.                this.buttonStyleName = "hudToggleButtonBarMiddleButton";
  341.                this.lastButtonStyleName = "hudToggleButtonBarLastButton";
  342.                this.firstButtonStyleName = "hudToggleButtonBarFirstButton";
  343.             };
  344.          }
  345.          style = StyleManager.getStyleDeclaration("Alert");
  346.          if(!style)
  347.          {
  348.             style = new CSSStyleDeclaration();
  349.             StyleManager.setStyleDeclaration("Alert",style,false);
  350.          }
  351.          if(style.factory == null)
  352.          {
  353.             style.factory = function():void
  354.             {
  355.                this.borderColor = 16777215;
  356.                this.modalTransparency = 0.7;
  357.                this.color = 0;
  358.                this.modalTransparencyBlur = 0;
  359.                this.modalTransparencyColor = 0;
  360.                this.borderAlpha = 1;
  361.                this.backgroundColor = 15527148;
  362.             };
  363.          }
  364.          style = StyleManager.getStyleDeclaration("Application");
  365.          if(!style)
  366.          {
  367.             style = new CSSStyleDeclaration();
  368.             StyleManager.setStyleDeclaration("Application",style,false);
  369.          }
  370.          if(style.factory == null)
  371.          {
  372.             style.factory = function():void
  373.             {
  374.                this.backgroundGradientColors = [4934475,4934475];
  375.                this.backgroundColor = 4934475;
  376.             };
  377.          }
  378.          style = StyleManager.getStyleDeclaration("Text");
  379.          if(!style)
  380.          {
  381.             style = new CSSStyleDeclaration();
  382.             StyleManager.setStyleDeclaration("Text",style,false);
  383.          }
  384.          if(style.factory == null)
  385.          {
  386.             style.factory = function():void
  387.             {
  388.                this.fontSize = 11;
  389.                this.fontFamily = "MockupsBaseFont";
  390.             };
  391.          }
  392.          style = StyleManager.getStyleDeclaration("Button");
  393.          if(!style)
  394.          {
  395.             style = new CSSStyleDeclaration();
  396.             StyleManager.setStyleDeclaration("Button",style,false);
  397.          }
  398.          if(style.factory == null)
  399.          {
  400.             style.factory = function():void
  401.             {
  402.                this.fontWeight = "normal";
  403.                this.fontFamily = "MockupsBoldFont";
  404.             };
  405.          }
  406.          style = StyleManager.getStyleDeclaration("CheckBox");
  407.          if(!style)
  408.          {
  409.             style = new CSSStyleDeclaration();
  410.             StyleManager.setStyleDeclaration("CheckBox",style,false);
  411.          }
  412.          if(style.factory == null)
  413.          {
  414.             style.factory = function():void
  415.             {
  416.                this.fontSize = 11;
  417.                this.fontFamily = "MockupsBaseFont";
  418.             };
  419.          }
  420.          style = StyleManager.getStyleDeclaration("MenuBarHaloBorder");
  421.          if(!style)
  422.          {
  423.             style = new CSSStyleDeclaration();
  424.             StyleManager.setStyleDeclaration("MenuBarHaloBorder",style,false);
  425.          }
  426.          if(style.factory == null)
  427.          {
  428.             style.factory = function():void
  429.             {
  430.                this.fillAlphas = [1,1];
  431.                this.backgroundAlpha = 1;
  432.                this.borderThickness = 1;
  433.                this.borderStyle = "solid";
  434.                this.backgroundColor = 8376063;
  435.             };
  436.          }
  437.          style = StyleManager.getStyleDeclaration("InspectorsCanvas");
  438.          if(!style)
  439.          {
  440.             style = new CSSStyleDeclaration();
  441.             StyleManager.setStyleDeclaration("InspectorsCanvas",style,false);
  442.          }
  443.          if(style.factory == null)
  444.          {
  445.             style.factory = function():void
  446.             {
  447.                this.paddingTop = 20;
  448.                this.padding = 5;
  449.                this.itemVpadding = 3;
  450.                this.itemHpadding = 3;
  451.             };
  452.          }
  453.          style = StyleManager.getStyleDeclaration("TextInput");
  454.          if(!style)
  455.          {
  456.             style = new CSSStyleDeclaration();
  457.             StyleManager.setStyleDeclaration("TextInput",style,false);
  458.          }
  459.          if(style.factory == null)
  460.          {
  461.             style.factory = function():void
  462.             {
  463.                this.fontSize = 11;
  464.                this.fontFamily = "MockupsBaseFont";
  465.             };
  466.          }
  467.          style = StyleManager.getStyleDeclaration(".tabBarFirstTab");
  468.          if(!style)
  469.          {
  470.             style = new CSSStyleDeclaration();
  471.             StyleManager.setStyleDeclaration(".tabBarFirstTab",style,false);
  472.          }
  473.          if(style.factory == null)
  474.          {
  475.             style.factory = function():void
  476.             {
  477.                this.selectionColor = 3368499;
  478.                this.fillAlphas = [0,0,0,0];
  479.                this.color = 16777215;
  480.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  481.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  482.                this.rollOverColor = 3368499;
  483.                this.textRollOverColor = 16777215;
  484.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  485.                this.backgroundColor = 4934475;
  486.                this.textSelectedColor = 16777215;
  487.                this.fontFamily = "MockupsBaseFont";
  488.             };
  489.          }
  490.          style = StyleManager.getStyleDeclaration(".toggleButtonBarButton");
  491.          if(!style)
  492.          {
  493.             style = new CSSStyleDeclaration();
  494.             StyleManager.setStyleDeclaration(".toggleButtonBarButton",style,false);
  495.          }
  496.          if(style.factory == null)
  497.          {
  498.             style.factory = function():void
  499.             {
  500.                this.fillAlphas = [1,1];
  501.                this.fillColors = [15198183,15198183];
  502.                this.fontFamily = "MockupsBaseFont";
  503.             };
  504.          }
  505.          style = StyleManager.getStyleDeclaration("MyPopUpMenuButton");
  506.          if(!style)
  507.          {
  508.             style = new CSSStyleDeclaration();
  509.             StyleManager.setStyleDeclaration("MyPopUpMenuButton",style,false);
  510.          }
  511.          if(style.factory == null)
  512.          {
  513.             style.factory = function():void
  514.             {
  515.                this.closeDuration = 0;
  516.                this.openDuration = 0;
  517.             };
  518.          }
  519.          style = StyleManager.getStyleDeclaration(".HUDCheckbox");
  520.          if(!style)
  521.          {
  522.             style = new CSSStyleDeclaration();
  523.             StyleManager.setStyleDeclaration(".HUDCheckbox",style,false);
  524.          }
  525.          if(style.factory == null)
  526.          {
  527.             style.factory = function():void
  528.             {
  529.                this.borderColor = 16777215;
  530.                this.color = 16777215;
  531.                this.fillAlphas = [1,1];
  532.                this.fontWeight = "normal";
  533.                this.fillColors = [4934475,4934475];
  534.                this.textRollOverColor = 16777215;
  535.                this.fontSize = 9;
  536.                this.selectedUpIcon = _embed_css___skin_checkboxselectedup_png_316675045;
  537.                this.textSelectedColor = 16777215;
  538.                this.fontFamily = "MockupsBaseFont";
  539.             };
  540.          }
  541.          style = StyleManager.getStyleDeclaration("ToolTip");
  542.          if(!style)
  543.          {
  544.             style = new CSSStyleDeclaration();
  545.             StyleManager.setStyleDeclaration("ToolTip",style,false);
  546.          }
  547.          if(style.factory == null)
  548.          {
  549.             style.factory = function():void
  550.             {
  551.                this.fontSize = 11;
  552.                this.fontFamily = "MockupsBaseFont";
  553.             };
  554.          }
  555.          style = StyleManager.getStyleDeclaration(".mockupsBar");
  556.          if(!style)
  557.          {
  558.             style = new CSSStyleDeclaration();
  559.             StyleManager.setStyleDeclaration(".mockupsBar",style,false);
  560.          }
  561.          if(style.factory == null)
  562.          {
  563.             style.factory = function():void
  564.             {
  565.                this.color = 16777215;
  566.                this.tabStyleName = "tabBarTab";
  567.                this.selectedTabTextStyleName = "tabBarSelectedTabText";
  568.                this.firstTabStyleName = "tabBarFirstTab";
  569.                this.fontFamily = "MockupsBaseFont";
  570.                this.lastTabStyleName = "tabBarLastTab";
  571.             };
  572.          }
  573.          style = StyleManager.getStyleDeclaration(".buttonBarLastTab");
  574.          if(!style)
  575.          {
  576.             style = new CSSStyleDeclaration();
  577.             StyleManager.setStyleDeclaration(".buttonBarLastTab",style,false);
  578.          }
  579.          if(style.factory == null)
  580.          {
  581.             style.factory = function():void
  582.             {
  583.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  584.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  585.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  586.                this.upSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastUpSkin_605336577;
  587.                this.downSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastDownSkin_284089736;
  588.                this.overSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastOverSkin_596406218;
  589.             };
  590.          }
  591.          style = StyleManager.getStyleDeclaration("MenuBar");
  592.          if(!style)
  593.          {
  594.             style = new CSSStyleDeclaration();
  595.             StyleManager.setStyleDeclaration("MenuBar",style,false);
  596.          }
  597.          if(style.factory == null)
  598.          {
  599.             style.factory = function():void
  600.             {
  601.                this.borderColor = 4934475;
  602.                this.fillAlphas = [1,1];
  603.                this.color = 16777215;
  604.                this.fillColors = [4934475,4934475];
  605.                this.backgroundAlpha = 1;
  606.                this.fontSize = 11;
  607.                this.borderThickness = 1;
  608.                this.borderStyle = "solid";
  609.                this.backgroundColor = 8376063;
  610.                this.fontFamily = "MockupsBaseFont";
  611.             };
  612.          }
  613.          style = StyleManager.getStyleDeclaration(".HUDColorPicker");
  614.          if(!style)
  615.          {
  616.             style = new CSSStyleDeclaration();
  617.             StyleManager.setStyleDeclaration(".HUDColorPicker",style,false);
  618.          }
  619.          if(style.factory == null)
  620.          {
  621.             style.factory = function():void
  622.             {
  623.                this.iconColor = 16777215;
  624.             };
  625.          }
  626.          style = StyleManager.getStyleDeclaration(".HUDSlider");
  627.          if(!style)
  628.          {
  629.             style = new CSSStyleDeclaration();
  630.             StyleManager.setStyleDeclaration(".HUDSlider",style,false);
  631.          }
  632.          if(style.factory == null)
  633.          {
  634.             style.factory = function():void
  635.             {
  636.                this.borderColor = 16777215;
  637.                this.color = 16777215;
  638.                this.fillAlphas = [1,1];
  639.                this.fontWeight = "normal";
  640.                this.fillColors = [4934475,4934475];
  641.                this.textRollOverColor = 16777215;
  642.                this.fontSize = 9;
  643.                this.textSelectedColor = 16777215;
  644.                this.fontFamily = "MockupsBaseFont";
  645.             };
  646.          }
  647.          style = StyleManager.getStyleDeclaration(".hudToggleButtonBarFirstButton");
  648.          if(!style)
  649.          {
  650.             style = new CSSStyleDeclaration();
  651.             StyleManager.setStyleDeclaration(".hudToggleButtonBarFirstButton",style,false);
  652.          }
  653.          if(style.factory == null)
  654.          {
  655.             style.factory = function():void
  656.             {
  657.                this.fillAlphas = [1,1];
  658.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  659.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  660.                this.fillColors = [4934475,4934475,4934475,4934475];
  661.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_firstSelectedUpSkin_1318526294;
  662.             };
  663.          }
  664.          style = StyleManager.getStyleDeclaration("HScrollBar");
  665.          if(!style)
  666.          {
  667.             style = new CSSStyleDeclaration();
  668.             StyleManager.setStyleDeclaration("HScrollBar",style,false);
  669.          }
  670.          if(style.factory == null)
  671.          {
  672.             style.factory = function():void
  673.             {
  674.                this.thumbOffset = 1;
  675.                this.trackColors = [4934475,7171437];
  676.                this.downArrowSkin = _embed_css___skin_downarrow_png_1464922515;
  677.                this.borderColor = 16777215;
  678.                this.fillAlphas = [0.7,1];
  679.                this.fillColors = [4934475,4934475];
  680.                this.upArrowSkin = _embed_css___skin_uparrow_png_504447974;
  681.                this.thumbIcon = _embed_css___skin_VScrollThumb_png_1095913499;
  682.             };
  683.          }
  684.          style = StyleManager.getStyleDeclaration(".hudToggleButtonBarMiddleButton");
  685.          if(!style)
  686.          {
  687.             style = new CSSStyleDeclaration();
  688.             StyleManager.setStyleDeclaration(".hudToggleButtonBarMiddleButton",style,false);
  689.          }
  690.          if(style.factory == null)
  691.          {
  692.             style.factory = function():void
  693.             {
  694.                this.fillAlphas = [1,1];
  695.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  696.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  697.                this.fillColors = [4934475,4934475,4934475,4934475];
  698.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  699.             };
  700.          }
  701.          style = StyleManager.getStyleDeclaration(".inspectorLabel");
  702.          if(!style)
  703.          {
  704.             style = new CSSStyleDeclaration();
  705.             StyleManager.setStyleDeclaration(".inspectorLabel",style,false);
  706.          }
  707.          if(style.factory == null)
  708.          {
  709.             style.factory = function():void
  710.             {
  711.                this.textAlign = "right";
  712.                this.color = 16777215;
  713.                this.fontWeight = "normal";
  714.                this.fontSize = 9;
  715.                this.fontFamily = "MockupsBaseFont";
  716.             };
  717.          }
  718.          style = StyleManager.getStyleDeclaration(".hudToggleButtonBarLastButton");
  719.          if(!style)
  720.          {
  721.             style = new CSSStyleDeclaration();
  722.             StyleManager.setStyleDeclaration(".hudToggleButtonBarLastButton",style,false);
  723.          }
  724.          if(style.factory == null)
  725.          {
  726.             style.factory = function():void
  727.             {
  728.                this.fillAlphas = [1,1];
  729.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  730.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  731.                this.fillColors = [4934475,4934475,4934475,4934475];
  732.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  733.             };
  734.          }
  735.          style = StyleManager.getStyleDeclaration(".buttonBarSelectedTabText");
  736.          if(!style)
  737.          {
  738.             style = new CSSStyleDeclaration();
  739.             StyleManager.setStyleDeclaration(".buttonBarSelectedTabText",style,false);
  740.          }
  741.          if(style.factory == null)
  742.          {
  743.             style.factory = function():void
  744.             {
  745.                this.color = 16777215;
  746.                this.fontFamily = "MockupsBoldFont";
  747.             };
  748.          }
  749.          style = StyleManager.getStyleDeclaration(".HUDSearchBox");
  750.          if(!style)
  751.          {
  752.             style = new CSSStyleDeclaration();
  753.             StyleManager.setStyleDeclaration(".HUDSearchBox",style,false);
  754.          }
  755.          if(style.factory == null)
  756.          {
  757.             style.factory = function():void
  758.             {
  759.                this.paddingTop = 1;
  760.                this.color = 16777215;
  761.                this.paddingLeft = 18;
  762.                this.fontWeight = "normal";
  763.                this.fontSize = 9;
  764.                this.borderSkin = _embed_css___skin_MockupsSkinAssets_swf_HUDSearchBox_84570465;
  765.                this.borderStyle = "none";
  766.                this.fontFamily = "MockupsBaseFont";
  767.             };
  768.          }
  769.          style = StyleManager.getStyleDeclaration(".escapeFullScreenWarningLabel");
  770.          if(!style)
  771.          {
  772.             style = new CSSStyleDeclaration();
  773.             StyleManager.setStyleDeclaration(".escapeFullScreenWarningLabel",style,false);
  774.          }
  775.          if(style.factory == null)
  776.          {
  777.             style.factory = function():void
  778.             {
  779.                this.color = 16777215;
  780.                this.fontSize = 20;
  781.                this.fontFamily = "MockupsBoldFont";
  782.             };
  783.          }
  784.          style = StyleManager.getStyleDeclaration("List");
  785.          if(!style)
  786.          {
  787.             style = new CSSStyleDeclaration();
  788.             StyleManager.setStyleDeclaration("List",style,false);
  789.          }
  790.          if(style.factory == null)
  791.          {
  792.             style.factory = function():void
  793.             {
  794.                this.color = 16777215;
  795.                this.checkIcon = _embed_css___skin_menucheck_png_1180737653;
  796.                this.textRollOverColor = 0;
  797.                this.fontSize = 11;
  798.                this.radioIcon = _embed_css___skin_menuRadioIcon_png_482829281;
  799.                this.backgroundColor = 4934475;
  800.                this.textSelectedColor = 0;
  801.                this.fontFamily = "MockupsBaseFont";
  802.             };
  803.          }
  804.          style = StyleManager.getStyleDeclaration(".buttonBarTab");
  805.          if(!style)
  806.          {
  807.             style = new CSSStyleDeclaration();
  808.             StyleManager.setStyleDeclaration(".buttonBarTab",style,false);
  809.          }
  810.          if(style.factory == null)
  811.          {
  812.             style.factory = function():void
  813.             {
  814.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  815.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  816.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  817.                this.upSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonUpSkin_944469021;
  818.                this.downSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonDownSkin_1913424292;
  819.                this.overSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonOverSkin_828974362;
  820.             };
  821.          }
  822.          style = StyleManager.getStyleDeclaration("LinkButton");
  823.          if(!style)
  824.          {
  825.             style = new CSSStyleDeclaration();
  826.             StyleManager.setStyleDeclaration("LinkButton",style,false);
  827.          }
  828.          if(style.factory == null)
  829.          {
  830.             style.factory = function():void
  831.             {
  832.                this.paddingTop = 0;
  833.                this.paddingLeft = 0;
  834.                this.color = 204;
  835.                this.fontWeight = "normal";
  836.                this.paddingRight = 0;
  837.                this.textDecoration = "underline";
  838.                this.paddingBottom = 0;
  839.                this.fontFamily = "MockupsBaseFont";
  840.             };
  841.          }
  842.          style = StyleManager.getStyleDeclaration(".mockupsCanvas");
  843.          if(!style)
  844.          {
  845.             style = new CSSStyleDeclaration();
  846.             StyleManager.setStyleDeclaration(".mockupsCanvas",style,false);
  847.          }
  848.          if(style.factory == null)
  849.          {
  850.             style.factory = function():void
  851.             {
  852.                this.borderColor = 4934475;
  853.                this.borderThickness = 0;
  854.                this.borderStyle = "solid";
  855.                this.backgroundColor = 4934475;
  856.             };
  857.          }
  858.          style = StyleManager.getStyleDeclaration("Label");
  859.          if(!style)
  860.          {
  861.             style = new CSSStyleDeclaration();
  862.             StyleManager.setStyleDeclaration("Label",style,false);
  863.          }
  864.          if(style.factory == null)
  865.          {
  866.             style.factory = function():void
  867.             {
  868.                this.fontSize = 11;
  869.                this.fontFamily = "MockupsBaseFont";
  870.             };
  871.          }
  872.          style = StyleManager.getStyleDeclaration(".myColorPickerSwatchPanel");
  873.          if(!style)
  874.          {
  875.             style = new CSSStyleDeclaration();
  876.             StyleManager.setStyleDeclaration(".myColorPickerSwatchPanel",style,false);
  877.          }
  878.          if(style.factory == null)
  879.          {
  880.             style.factory = function():void
  881.             {
  882.                this.columnCount = 8;
  883.                this.swatchWidth = 20;
  884.                this.previewHeight = 0;
  885.                this.previewWidth = 0;
  886.                this.swatchHeight = 20;
  887.             };
  888.          }
  889.          style = StyleManager.getStyleDeclaration("TabBar");
  890.          if(!style)
  891.          {
  892.             style = new CSSStyleDeclaration();
  893.             StyleManager.setStyleDeclaration("TabBar",style,false);
  894.          }
  895.          if(style.factory == null)
  896.          {
  897.             style.factory = function():void
  898.             {
  899.                this.color = 16777215;
  900.                this.tabStyleName = "tabBarTab";
  901.                this.fontSize = 11;
  902.                this.selectedTabTextStyleName = "tabBarSelectedTabText";
  903.                this.firstTabStyleName = "tabBarFirstTab";
  904.                this.fontFamily = "MockupsBaseFont";
  905.                this.lastTabStyleName = "tabBarLastTab";
  906.             };
  907.          }
  908.          style = StyleManager.getStyleDeclaration("TitleWindow");
  909.          if(!style)
  910.          {
  911.             style = new CSSStyleDeclaration();
  912.             StyleManager.setStyleDeclaration("TitleWindow",style,false);
  913.          }
  914.          if(style.factory == null)
  915.          {
  916.             style.factory = function():void
  917.             {
  918.                this.modalTransparency = 0.7;
  919.                this.titleStyleName = "boldFont";
  920.                this.modalTransparencyBlur = 0;
  921.                this.modalTransparencyColor = 0;
  922.                this.borderAlpha = 1;
  923.             };
  924.          }
  925.          style = StyleManager.getStyleDeclaration("ToggleButtonBar");
  926.          if(!style)
  927.          {
  928.             style = new CSSStyleDeclaration();
  929.             StyleManager.setStyleDeclaration("ToggleButtonBar",style,false);
  930.          }
  931.          if(style.factory == null)
  932.          {
  933.             style.factory = function():void
  934.             {
  935.                this.selectedButtonTextStyleName = "toggleButtonBarSelectedButtonText";
  936.                this.fontSize = 11;
  937.                this.lastButtonStyleName = "toggleButtonBarButton";
  938.                this.buttonStyleName = "toggleButtonBarButton";
  939.                this.firstButtonStyleName = "toggleButtonBarButton";
  940.                this.fontFamily = "MockupsBaseFont";
  941.             };
  942.          }
  943.          style = StyleManager.getStyleDeclaration(".searchBox");
  944.          if(!style)
  945.          {
  946.             style = new CSSStyleDeclaration();
  947.             StyleManager.setStyleDeclaration(".searchBox",style,false);
  948.          }
  949.          if(style.factory == null)
  950.          {
  951.             style.factory = function():void
  952.             {
  953.                this.paddingTop = 1;
  954.                this.paddingLeft = 18;
  955.                this.borderSkin = _embed_css___skin_MockupsSkinAssets_swf_SearchBox_1716360600;
  956.                this.borderStyle = "solid";
  957.             };
  958.          }
  959.          style = StyleManager.getStyleDeclaration(".HUDLinkButton");
  960.          if(!style)
  961.          {
  962.             style = new CSSStyleDeclaration();
  963.             StyleManager.setStyleDeclaration(".HUDLinkButton",style,false);
  964.          }
  965.          if(style.factory == null)
  966.          {
  967.             style.factory = function():void
  968.             {
  969.                this.color = 16777215;
  970.                this.fontWeight = "normal";
  971.                this.textRollOverColor = 0;
  972.                this.textSelectedColor = 0;
  973.                this.fontFamily = "MockupsBaseFont";
  974.             };
  975.          }
  976.          style = StyleManager.getStyleDeclaration(".toggleButtonBarSelectedButtonText");
  977.          if(!style)
  978.          {
  979.             style = new CSSStyleDeclaration();
  980.             StyleManager.setStyleDeclaration(".toggleButtonBarSelectedButtonText",style,false);
  981.          }
  982.          if(style.factory == null)
  983.          {
  984.             style.factory = function():void
  985.             {
  986.                this.fontFamily = "MockupsBoldFont";
  987.             };
  988.          }
  989.          style = StyleManager.getStyleDeclaration("ComboBox");
  990.          if(!style)
  991.          {
  992.             style = new CSSStyleDeclaration();
  993.             StyleManager.setStyleDeclaration("ComboBox",style,false);
  994.          }
  995.          if(style.factory == null)
  996.          {
  997.             style.factory = function():void
  998.             {
  999.                this.fontWeight = "normal";
  1000.                this.fontFamily = "MockupsBoldFont";
  1001.             };
  1002.          }
  1003.          style = StyleManager.getStyleDeclaration(".tabBarSelectedTabText");
  1004.          if(!style)
  1005.          {
  1006.             style = new CSSStyleDeclaration();
  1007.             StyleManager.setStyleDeclaration(".tabBarSelectedTabText",style,false);
  1008.          }
  1009.          if(style.factory == null)
  1010.          {
  1011.             style.factory = function():void
  1012.             {
  1013.                this.selectionColor = 3368499;
  1014.                this.color = 16777215;
  1015.                this.fontWeight = "normal";
  1016.                this.rollOverColor = 3368499;
  1017.                this.textRollOverColor = 16777215;
  1018.                this.backgroundColor = 4934475;
  1019.                this.textSelectedColor = 16777215;
  1020.                this.fontFamily = "MockupsBoldFont";
  1021.             };
  1022.          }
  1023.          style = StyleManager.getStyleDeclaration(".tabBarLastTab");
  1024.          if(!style)
  1025.          {
  1026.             style = new CSSStyleDeclaration();
  1027.             StyleManager.setStyleDeclaration(".tabBarLastTab",style,false);
  1028.          }
  1029.          if(style.factory == null)
  1030.          {
  1031.             style.factory = function():void
  1032.             {
  1033.                this.selectionColor = 3368499;
  1034.                this.fillAlphas = [0,0,0,0];
  1035.                this.color = 16777215;
  1036.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  1037.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  1038.                this.rollOverColor = 3368499;
  1039.                this.textRollOverColor = 16777215;
  1040.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_lastSelectedUpSkin_1956209268;
  1041.                this.backgroundColor = 4934475;
  1042.                this.textSelectedColor = 16777215;
  1043.                this.fontFamily = "MockupsBaseFont";
  1044.             };
  1045.          }
  1046.          style = StyleManager.getStyleDeclaration(".dialogComboBox");
  1047.          if(!style)
  1048.          {
  1049.             style = new CSSStyleDeclaration();
  1050.             StyleManager.setStyleDeclaration(".dialogComboBox",style,false);
  1051.          }
  1052.          if(style.factory == null)
  1053.          {
  1054.             style.factory = function():void
  1055.             {
  1056.                this.fontWeight = "normal";
  1057.                this.dropdownStyleName = "dialogComboBoxDropdown";
  1058.                this.fontFamily = "MockupsBaseFont";
  1059.             };
  1060.          }
  1061.          style = StyleManager.getStyleDeclaration(".UILibrary");
  1062.          if(!style)
  1063.          {
  1064.             style = new CSSStyleDeclaration();
  1065.             StyleManager.setStyleDeclaration(".UILibrary",style,false);
  1066.          }
  1067.          if(style.factory == null)
  1068.          {
  1069.             style.factory = function():void
  1070.             {
  1071.                this.paddingLeft = 0;
  1072.                this.color = 0;
  1073.                this.paddingRight = 0;
  1074.                this.borderStyle = "none";
  1075.                this.fontFamily = "MockupsBaseFont";
  1076.             };
  1077.          }
  1078.          style = StyleManager.getStyleDeclaration(".dialogButtonBar");
  1079.          if(!style)
  1080.          {
  1081.             style = new CSSStyleDeclaration();
  1082.             StyleManager.setStyleDeclaration(".dialogButtonBar",style,false);
  1083.          }
  1084.          if(style.factory == null)
  1085.          {
  1086.             style.factory = function():void
  1087.             {
  1088.                this.selectedButtonTextStyleName = "buttonBarSelectedTabText";
  1089.                this.color = 0;
  1090.                this.fontWeight = "normal";
  1091.                this.buttonStyleName = "buttonBarTab";
  1092.                this.lastButtonStyleName = "buttonBarLastTab";
  1093.                this.firstButtonStyleName = "buttonBarFirstTab";
  1094.                this.fontFamily = "MockupsBaseFont";
  1095.             };
  1096.          }
  1097.          style = StyleManager.getStyleDeclaration(".libraryList");
  1098.          if(!style)
  1099.          {
  1100.             style = new CSSStyleDeclaration();
  1101.             StyleManager.setStyleDeclaration(".libraryList",style,false);
  1102.          }
  1103.          if(style.factory == null)
  1104.          {
  1105.             style.factory = function():void
  1106.             {
  1107.                this.paddingTop = -2;
  1108.                this.color = 16777215;
  1109.                this.paddingLeft = 0;
  1110.                this.paddingRight = 0;
  1111.                this.fontSize = 11;
  1112.                this.paddingBottom = 0;
  1113.                this.borderStyle = "none";
  1114.                this.textSelectedColor = 0;
  1115.                this.fontFamily = "MockupsBaseFont";
  1116.                this.backgroundColor = 4934475;
  1117.             };
  1118.          }
  1119.          style = StyleManager.getStyleDeclaration(".HUDComboBox");
  1120.          if(!style)
  1121.          {
  1122.             style = new CSSStyleDeclaration();
  1123.             StyleManager.setStyleDeclaration(".HUDComboBox",style,false);
  1124.          }
  1125.          if(style.factory == null)
  1126.          {
  1127.             style.factory = function():void
  1128.             {
  1129.                this.borderColor = 16777215;
  1130.                this.color = 16777215;
  1131.                this.fillAlphas = [1,1,1,1];
  1132.                this.cornerRadius = 6;
  1133.                this.fontWeight = "normal";
  1134.                this.fillColors = [4934475,4934475];
  1135.                this.textRollOverColor = 0;
  1136.                this.fontSize = 9;
  1137.                this.dropdownStyleName = "comboBoxDropdown";
  1138.                this.closeDuration = 10;
  1139.                this.openDuration = 250;
  1140.                this.fontFamily = "MockupsBaseFont";
  1141.             };
  1142.          }
  1143.          style = StyleManager.getStyleDeclaration(".tabBarTab");
  1144.          if(!style)
  1145.          {
  1146.             style = new CSSStyleDeclaration();
  1147.             StyleManager.setStyleDeclaration(".tabBarTab",style,false);
  1148.          }
  1149.          if(style.factory == null)
  1150.          {
  1151.             style.factory = function():void
  1152.             {
  1153.                this.selectionColor = 3368499;
  1154.                this.fillAlphas = [0,0,0,0];
  1155.                this.color = 16777215;
  1156.                this.selectedDownSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  1157.                this.selectedUpSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  1158.                this.rollOverColor = 3368499;
  1159.                this.textRollOverColor = 16777215;
  1160.                this.selectedOverSkin = _embed_css___skin_MockupsSkinAssets_swf_ButtonBar_buttonSelectedUpSkin_131873192;
  1161.                this.backgroundColor = 4934475;
  1162.                this.textSelectedColor = 16777215;
  1163.                this.fontFamily = "MockupsBaseFont";
  1164.             };
  1165.          }
  1166.          style = StyleManager.getStyleDeclaration("Menu");
  1167.          if(!style)
  1168.          {
  1169.             style = new CSSStyleDeclaration();
  1170.             StyleManager.setStyleDeclaration("Menu",style,false);
  1171.          }
  1172.          if(style.factory == null)
  1173.          {
  1174.             style.factory = function():void
  1175.             {
  1176.                this.color = 16777215;
  1177.                this.checkIcon = _embed_css___skin_menucheck_png_1180737653;
  1178.                this.textRollOverColor = 0;
  1179.                this.fontSize = 11;
  1180.                this.radioIcon = _embed_css___skin_menuRadioIcon_png_482829281;
  1181.                this.backgroundColor = 4934475;
  1182.                this.openDuration = 0;
  1183.                this.textSelectedColor = 0;
  1184.                this.fontFamily = "MockupsBaseFont";
  1185.             };
  1186.          }
  1187.          style = StyleManager.getStyleDeclaration("VScrollBar");
  1188.          if(!style)
  1189.          {
  1190.             style = new CSSStyleDeclaration();
  1191.             StyleManager.setStyleDeclaration("VScrollBar",style,false);
  1192.          }
  1193.          if(style.factory == null)
  1194.          {
  1195.             style.factory = function():void
  1196.             {
  1197.                this.thumbOffset = 1;
  1198.                this.trackColors = [4934475,7171437];
  1199.                this.downArrowSkin = _embed_css___skin_downarrow_png_1464922515;
  1200.                this.borderColor = 16777215;
  1201.                this.fillAlphas = [0.7,1];
  1202.                this.fillColors = [4934475,4934475];
  1203.                this.upArrowSkin = _embed_css___skin_uparrow_png_504447974;
  1204.                this.thumbIcon = _embed_css___skin_VScrollThumb_png_1095913499;
  1205.             };
  1206.          }
  1207.          style = StyleManager.getStyleDeclaration(".dialogComboBoxDropdown");
  1208.          if(!style)
  1209.          {
  1210.             style = new CSSStyleDeclaration();
  1211.             StyleManager.setStyleDeclaration(".dialogComboBoxDropdown",style,false);
  1212.          }
  1213.          if(style.factory == null)
  1214.          {
  1215.             style.factory = function():void
  1216.             {
  1217.                this.color = 0;
  1218.                this.textRollOverColor = 0;
  1219.                this.backgroundColor = 16777215;
  1220.                this.textSelectedColor = 0;
  1221.             };
  1222.          }
  1223.          style = StyleManager.getStyleDeclaration(".comboBoxDropdown");
  1224.          if(!style)
  1225.          {
  1226.             style = new CSSStyleDeclaration();
  1227.             StyleManager.setStyleDeclaration(".comboBoxDropdown",style,false);
  1228.          }
  1229.          if(style.factory == null)
  1230.          {
  1231.             style.factory = function():void
  1232.             {
  1233.                this.color = 16777215;
  1234.                this.textRollOverColor = 0;
  1235.                this.fontSize = 9;
  1236.                this.backgroundColor = 4934475;
  1237.                this.fontFamily = "MockupsBaseFont";
  1238.                this.textSelectedColor = 0;
  1239.             };
  1240.          }
  1241.          StyleManager.mx_internal::initProtoChainRoots();
  1242.       }
  1243.       
  1244.       protected function onInvoke(param1:InvokeEvent) : void
  1245.       {
  1246.          var path:String = null;
  1247.          var data:String = null;
  1248.          var rememberWindowSize:Boolean = false;
  1249.          var configFile:File = null;
  1250.          var isLinux:Boolean = false;
  1251.          var fileStream:FileStream = null;
  1252.          var xmlConfigs:XML = null;
  1253.          var useCookies:Boolean = false;
  1254.          var fontFace:String = null;
  1255.          var windowSizeAndPosition:Object = null;
  1256.          var rect:Rectangle = null;
  1257.          var intersectedScreens:Array = null;
  1258.          var inputFileName:String = null;
  1259.          var registered:Boolean = false;
  1260.          var p_evt:InvokeEvent = param1;
  1261.          var args:Array = p_evt.arguments;
  1262.          var isCommandLine:Boolean = args.length > 0;
  1263.          var isFirstRun:Boolean = _sm == null;
  1264.          if(isFirstRun)
  1265.          {
  1266.             addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER,onDragEnter);
  1267.             addEventListener(NativeDragEvent.NATIVE_DRAG_DROP,onDragDrop);
  1268.             nativeApplication.autoExit = false;
  1269.             rememberWindowSize = true;
  1270.             configFile = File.applicationStorageDirectory.resolvePath("BalsamiqMockups.cfg");
  1271.             if(configFile.exists)
  1272.             {
  1273.                fileStream = new FileStream();
  1274.                fileStream.open(configFile,FileMode.READ);
  1275.                data = fileStream.readUTFBytes(configFile.size);
  1276.                fileStream.close();
  1277.                try
  1278.                {
  1279.                   xmlConfigs = XML(data);
  1280.                   if(XMLList(xmlConfigs.useCookies).length() > 0)
  1281.                   {
  1282.                      useCookies = xmlConfigs.useCookies[0].toString().toLowerCase() == "true";
  1283.                      _mockups.model.cookieManager.useCookies = useCookies;
  1284.                   }
  1285.                   if(XMLList(xmlConfigs.fontFace).length() > 0)
  1286.                   {
  1287.                      fontFace = xmlConfigs.fontFace[0].toString();
  1288.                      _mockups.model.fontFace = fontFace;
  1289.                   }
  1290.                   if(XMLList(xmlConfigs.rememberWindowSize).length() > 0)
  1291.                   {
  1292.                      rememberWindowSize = xmlConfigs.rememberWindowSize[0].toString().toLowerCase() == "true";
  1293.                   }
  1294.                }
  1295.                catch(e:Error)
  1296.                {
  1297.                }
  1298.             }
  1299.             _mockups.host = MockupModel.HOST_DESKTOP;
  1300.             _mockups.cookieManager = new LocalDBManager();
  1301.             _sm = new StorageManagerAir(_mockups,!isCommandLine,_version);
  1302.             _sm.addEventListener("activateChange",onActivateChange);
  1303.             isLinux = Capabilities.os.indexOf("Linux") != -1;
  1304.             _mockups.menus = !isLinux ? new AppBarMenusAir() : new AppBarMenusAirLinux();
  1305.             _mockups.model.importImageDialogClass = ImportImageDialogAir;
  1306.             _mockupsBar.mockups = _mockups;
  1307.             _mockupsBar.fileManager = _sm;
  1308.             _nagTimer = new Timer(5 * 60 * 1000,1);
  1309.             _nagTimer.addEventListener(TimerEvent.TIMER,onNagTimer);
  1310.             if(!_sm.activated)
  1311.             {
  1312.                _nagTimer.start();
  1313.             }
  1314.             if(rememberWindowSize)
  1315.             {
  1316.                windowSizeAndPosition = _mockups.model.cookieManager.getProperty("windowSizeAndPosition",{
  1317.                   "x":0,
  1318.                   "y":0,
  1319.                   "w":Screen.mainScreen.bounds.width * 0.75,
  1320.                   "h":Screen.mainScreen.bounds.height * 0.75
  1321.                });
  1322.                rect = new Rectangle(windowSizeAndPosition.x,windowSizeAndPosition.y,windowSizeAndPosition.w,windowSizeAndPosition.h);
  1323.                intersectedScreens = Screen.getScreensForRectangle(rect);
  1324.                if(intersectedScreens.length == 0)
  1325.                {
  1326.                   windowSizeAndPosition.x = 0;
  1327.                   windowSizeAndPosition.y = 0;
  1328.                   _mockups.model.cookieManager.setProperty("windowSizeAndPosition",windowSizeAndPosition);
  1329.                }
  1330.                nativeApplication.openedWindows[0].x = windowSizeAndPosition.x;
  1331.                nativeApplication.openedWindows[0].y = windowSizeAndPosition.y;
  1332.                width = windowSizeAndPosition.w;
  1333.                height = windowSizeAndPosition.h;
  1334.                addEventListener(FlexNativeWindowBoundsEvent.WINDOW_MOVE,onWindowMovedOrSized);
  1335.                addEventListener(FlexNativeWindowBoundsEvent.WINDOW_RESIZE,onWindowMovedOrSized);
  1336.                _updateSizeTimer = new Timer(500,1);
  1337.                _updateSizeTimer.addEventListener(TimerEvent.TIMER_COMPLETE,onUpdateSizeTimerComplete);
  1338.             }
  1339.             visible = !isCommandLine;
  1340.             if(args.length == 0)
  1341.             {
  1342.                _sm.log("Did you know you could use Balsamiq Mockups from the command line?");
  1343.                _sm.log("Usage:");
  1344.                _sm.log("\tBalsamiq Mockups register <organizationName> <serialKey>");
  1345.                _sm.log("\t\t- registers this Mockups copy with the provided serial key info");
  1346.                _sm.log("\tBalsamiq Mockups export <inputXMLFilePath> <outputImageFilePath>");
  1347.                _sm.log("\t\t- exports the provided bmml or xml file to a PNG file");
  1348.                _sm.log("\tBalsamiq Mockups unregister");
  1349.                _sm.log("\t\t- un-registers Balsamiq Mockups from this computer");
  1350.                _sm.log("\tBalsamiq Mockups version");
  1351.                _sm.log("\t\t- prints the current version of Mockups for Desktop");
  1352.                _sm.log("");
  1353.                _sm.log("Examples:");
  1354.                _sm.log("\tBalsamiq Mockups register yourCompanyName 123abc");
  1355.                _sm.log("\tBalsamiq Mockups c:\\foo\\bar\\myMockup.bmml c:\\myimages\\myMockup.png");
  1356.                _sm.log("\tBalsamiq Mockups unregister");
  1357.                _sm.log("\tBalsamiq Mockups version");
  1358.                return;
  1359.             }
  1360.             if(isCommandLine)
  1361.             {
  1362.                switch(String(args[0]).toLowerCase())
  1363.                {
  1364.                   case "register":
  1365.                      if(_sm.activated)
  1366.                      {
  1367.                         _sm.log("Balsamiq Mockups has already been registered on this machine.");
  1368.                         nativeApplication.exit(1);
  1369.                         return;
  1370.                      }
  1371.                      if(args.length != 3)
  1372.                      {
  1373.                         _sm.log("usage: Balsamiq Mockups register <organizationName> <serialKey>");
  1374.                         nativeApplication.exit(2);
  1375.                         return;
  1376.                      }
  1377.                      registered = _sm.registerWithKey(String(args[1]),String(args[2]));
  1378.                      if(registered)
  1379.                      {
  1380.                         _sm.log("Balsamiq Mockups registration successful.");
  1381.                         nativeApplication.exit();
  1382.                      }
  1383.                      else
  1384.                      {
  1385.                         _sm.log("Problem registering, please try again.");
  1386.                         _sm.log("usage: Balsamiq Mockups register <organizationName> <serialKey>");
  1387.                         nativeApplication.exit(3);
  1388.                      }
  1389.                      break;
  1390.                   case "unregister":
  1391.                      _sm.deactivate();
  1392.                      _sm.log("Balsamiq Mockups successfully unregistered from this computer.");
  1393.                      nativeApplication.exit();
  1394.                      break;
  1395.                   case "export":
  1396.                      if(!_sm.activated)
  1397.                      {
  1398.                         _sm.log("You need to activate first with the following command:");
  1399.                         _sm.log("usage: Balsamiq Mockups register <organizationName> <serialKey>");
  1400.                         nativeApplication.exit(4);
  1401.                         return;
  1402.                      }
  1403.                      if(args.length != 3)
  1404.                      {
  1405.                         _sm.log("usage: Balsamiq Mockups export <inputXMLFilePath> <outputImageFilePath>");
  1406.                         nativeApplication.exit(2);
  1407.                         return;
  1408.                      }
  1409.                      _mockups.model.addEventListener(MockupModelEvent.VIEW_IS_READY,doSnapshot);
  1410.                      inputFileName = String(args[1]);
  1411.                      _snapshotName = String(args[2]);
  1412.                      _sm.log("loading " + inputFileName + " from disk");
  1413.                      data = _sm.loadFileFromDisk(inputFileName);
  1414.                      if(data == null || data == "")
  1415.                      {
  1416.                         _sm.log("invalid input file: " + inputFileName);
  1417.                         nativeApplication.exit(5);
  1418.                         return;
  1419.                      }
  1420.                      return;
  1421.                      break;
  1422.                   case "version":
  1423.                      _sm.log("Mockups for Desktop version " + _version);
  1424.                      nativeApplication.exit();
  1425.                      break;
  1426.                   default:
  1427.                      visible = true;
  1428.                      loadPaths(args);
  1429.                }
  1430.             }
  1431.          }
  1432.          else
  1433.          {
  1434.             loadPaths(args);
  1435.          }
  1436.       }
  1437.       
  1438.       protected function onCreationComplete() : void
  1439.       {
  1440.          removeEventListener(FlexEvent.CREATION_COMPLETE,onCreationComplete);
  1441.          nativeApplication.addEventListener(InvokeEvent.INVOKE,onInvoke);
  1442.          nativeWindow.addEventListener(Event.CLOSING,onClosing);
  1443.       }
  1444.       
  1445.       public function onDragDrop(param1:NativeDragEvent) : void
  1446.       {
  1447.          var _loc4_:File = null;
  1448.          var _loc2_:Array = param1.clipboard.getData(ClipboardFormats.FILE_LIST_FORMAT) as Array;
  1449.          var _loc3_:Array = new Array();
  1450.          for each(_loc4_ in _loc2_)
  1451.          {
  1452.             _loc3_.push(_loc4_.nativePath);
  1453.          }
  1454.          loadPaths(_loc3_);
  1455.       }
  1456.       
  1457.       protected function onNagClose(param1:Event) : void
  1458.       {
  1459.          _nagDialog.removeEventListener("nagClose",onNagClose);
  1460.          _nagTimer.start();
  1461.       }
  1462.       
  1463.       [Bindable(event="propertyChange")]
  1464.       public function get _mockups() : Mockups
  1465.       {
  1466.          return this._710521297_mockups;
  1467.       }
  1468.       
  1469.       protected function onActivateChange(param1:Event) : void
  1470.       {
  1471.          if(_sm.activated)
  1472.          {
  1473.             _nagTimer.stop();
  1474.          }
  1475.       }
  1476.       
  1477.       public function set _mockups(param1:Mockups) : void
  1478.       {
  1479.          var _loc2_:Object = this._710521297_mockups;
  1480.          if(_loc2_ !== param1)
  1481.          {
  1482.             this._710521297_mockups = param1;
  1483.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"_mockups",_loc2_,param1));
  1484.          }
  1485.       }
  1486.       
  1487.       [Bindable(event="propertyChange")]
  1488.       public function get _mockupsBar() : MockupsBar
  1489.       {
  1490.          return this._1541057692_mockupsBar;
  1491.       }
  1492.       
  1493.       public function ___MockupsAir_WindowedApplication1_addedToStage(param1:Event) : void
  1494.       {
  1495.          onAddedToStage();
  1496.       }
  1497.       
  1498.       protected function doSnapshot(param1:MockupModelEvent) : void
  1499.       {
  1500.          _mockups.model.removeEventListener(MockupModelEvent.VIEW_IS_READY,doSnapshot);
  1501.          _sm.snapshot(_snapshotName);
  1502.          nativeApplication.exit();
  1503.       }
  1504.       
  1505.       protected function onUpdateSizeTimerComplete(param1:TimerEvent) : void
  1506.       {
  1507.          if(stage.displayState != StageDisplayState.NORMAL)
  1508.          {
  1509.             return;
  1510.          }
  1511.          _mockups.model.cookieManager.setProperty("windowSizeAndPosition",{
  1512.             "x":nativeApplication.openedWindows[0].x,
  1513.             "y":nativeApplication.openedWindows[0].y,
  1514.             "w":Math.max(width,880),
  1515.             "h":Math.max(height,680)
  1516.          });
  1517.       }
  1518.       
  1519.       protected function onWindowMovedOrSized(param1:FlexNativeWindowBoundsEvent) : void
  1520.       {
  1521.          if(stage.displayState != StageDisplayState.NORMAL)
  1522.          {
  1523.             return;
  1524.          }
  1525.          _updateSizeTimer.reset();
  1526.          _updateSizeTimer.start();
  1527.       }
  1528.       
  1529.       override public function initialize() : void
  1530.       {
  1531.          var bindings:Array;
  1532.          var watchers:Array;
  1533.          var i:uint;
  1534.          var target:MockupsAir = null;
  1535.          var watcherSetupUtilClass:Object = null;
  1536.          mx_internal::setDocumentDescriptor(_documentDescriptor_);
  1537.          bindings = _MockupsAir_bindingsSetup();
  1538.          watchers = [];
  1539.          target = this;
  1540.          if(_watcherSetupUtil == null)
  1541.          {
  1542.             watcherSetupUtilClass = getDefinitionByName("_MockupsAirWatcherSetupUtil");
  1543.             watcherSetupUtilClass["init"](null);
  1544.          }
  1545.          _watcherSetupUtil.setup(this,function(param1:String):*
  1546.          {
  1547.             return target[param1];
  1548.          },bindings,watchers);
  1549.          i = 0;
  1550.          while(i < bindings.length)
  1551.          {
  1552.             Binding(bindings[i]).execute();
  1553.             i++;
  1554.          }
  1555.          mx_internal::_bindings = mx_internal::_bindings.concat(bindings);
  1556.          mx_internal::_watchers = mx_internal::_watchers.concat(watchers);
  1557.          super.initialize();
  1558.       }
  1559.       
  1560.       [Bindable(event="propertyChange")]
  1561.       protected function get _version() : String
  1562.       {
  1563.          return this._1585134695_version;
  1564.       }
  1565.       
  1566.       private function _MockupsAir_bindingExprs() : void
  1567.       {
  1568.          var _loc1_:* = undefined;
  1569.          _loc1_ = _version;
  1570.          _loc1_ = _sm;
  1571.       }
  1572.       
  1573.       protected function onNagTimer(param1:TimerEvent) : void
  1574.       {
  1575.          _nagTimer.stop();
  1576.          if(Boolean(_nagDialog) && Boolean(_nagDialog.parent))
  1577.          {
  1578.             return;
  1579.          }
  1580.          _nagDialog = NagDialog(PopUpManager.createPopUp(this,NagDialog,true));
  1581.          _nagDialog.message = "Thank you for spending the last five minutes trying out Balsamiq Mockups.\n\nWe hope you will like enough to consider switching to our paid version.";
  1582.          _nagDialog.linkMessage = "Buy Balsamiq Mockups now!";
  1583.          _nagDialog.url = "http://www.balsamiq.com/products/mockups/desktop#buy";
  1584.          _nagDialog.addEventListener("nagClose",onNagClose);
  1585.          _nagDialog.init(_mockups.inputManager);
  1586.          PopUpManager.centerPopUp(_nagDialog);
  1587.       }
  1588.       
  1589.       protected function onAddedToStage() : void
  1590.       {
  1591.          removeEventListener(Event.ADDED_TO_STAGE,onAddedToStage);
  1592.          stage.addEventListener(FullScreenEvent.FULL_SCREEN,onFullScreen);
  1593.       }
  1594.       
  1595.       protected function loadPaths(param1:Array) : void
  1596.       {
  1597.          var _loc4_:String = null;
  1598.          var _loc2_:uint = param1.length;
  1599.          var _loc3_:uint = 0;
  1600.          while(_loc3_ < _loc2_)
  1601.          {
  1602.             _loc4_ = param1[_loc3_];
  1603.             if(_loc3_ == _loc2_ - 1)
  1604.             {
  1605.                _sm.loadFileFromDisk(_loc4_);
  1606.             }
  1607.             else
  1608.             {
  1609.                _sm.loadDataIntoMemory(_loc4_);
  1610.             }
  1611.             _loc3_++;
  1612.          }
  1613.       }
  1614.       
  1615.       public function set _mockupsBar(param1:MockupsBar) : void
  1616.       {
  1617.          var _loc2_:Object = this._1541057692_mockupsBar;
  1618.          if(_loc2_ !== param1)
  1619.          {
  1620.             this._1541057692_mockupsBar = param1;
  1621.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"_mockupsBar",_loc2_,param1));
  1622.          }
  1623.       }
  1624.       
  1625.       protected function onClosing(param1:Event) : void
  1626.       {
  1627.          if(_sm)
  1628.          {
  1629.             _sm.quit();
  1630.          }
  1631.       }
  1632.       
  1633.       public function onDragEnter(param1:NativeDragEvent) : void
  1634.       {
  1635.          if(param1.clipboard.formats.length > 0)
  1636.          {
  1637.             DragManager.acceptDragDrop(this);
  1638.          }
  1639.       }
  1640.       
  1641.       protected function set _sm(param1:StorageManagerAir) : void
  1642.       {
  1643.          var _loc2_:Object = this._94969_sm;
  1644.          if(_loc2_ !== param1)
  1645.          {
  1646.             this._94969_sm = param1;
  1647.             this.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this,"_sm",_loc2_,param1));
  1648.          }
  1649.       }
  1650.       
  1651.       [Bindable(event="propertyChange")]
  1652.       protected function get _sm() : StorageManagerAir
  1653.       {
  1654.          return this._94969_sm;
  1655.       }
  1656.    }
  1657. }
  1658.  
  1659.